<form id="form_edit_geo_city_in_m80" encType="multipart/form-data" method="post" action="#" class="form">
    <input type="hidden" name="datagrid_code" value="geo_city_m80">
    <input type="hidden" name="id" value="{$id}">
    <div class="wrapper-form">
        <div id="form_content_edit_geo_city_in_m80">
            <dl class="row">
                <dt class="tit">
                    <label><em>*</em>城市代号</label>
                </dt>
                <dd class="opt">
                    <input type="text" name="city_code" class="input-txt" maxLength="50"/>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label><em>*</em>城市名称</label>
                </dt>
                <dd class="opt">
                    <input type="text" name="city_name" class="input-txt" maxLength="50"/>
                </dd>
            </dl>
        </div>
        <dl class="row">
            <dt class="tit">
                <label>状态</label>
            </dt>
            <dd class="opt">
                <label><input type="radio" value="1" checked="checked" name="status">启用</label>
                <label><input type="radio" value="2" name="status">禁用</label>
                <span class="err"></span>
            </dd>
        </dl>
    </div>
</form>
<script>
    $(function () {
        var subjectId = "{$id}";
        var subjectKeyword = "geo_city_in_m80";
        var formId = "#form_edit_" + subjectKeyword;

        var loadData = getDetailInfo(subjectId);
        $(formId).form("load", loadData);

        function getDetailInfo(subjectId) {
            var data = {};
            $.ajax({
                url: '/api/GeoCity/getGeoCityInfo',
                async: false,
                type: 'post',
                data: {id: subjectId},
                success: function (resp) {
                    if (1 == resp.code) {
                        data = resp.data;
                    }
                }
            });
            return data;
        }
    });
</script>